package com.zzy.ymcc.feign;


import com.zzy.ymcc.domain.Login;
import com.zzy.ymcc.result.JSONResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;


// contextId = "login"：当一个服务创建多个feign接口时，要么加yml配置，要么给当前feign接口来一个唯一标识
@FeignClient(contextId = "login",value = "service-uaa", fallbackFactory = LoginServiceFallbackFactory.class)
// @RequestMapping("/login")：有些版本微服务会认为跟controller接口冲突，报错重复，所以我们直接加到feignjiekou上
public interface LoginService {


    @RequestMapping(value="/login/save",method= RequestMethod.POST)
    JSONResult saveOrUpdate(@RequestBody Login login);

}
